﻿<Window
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:am="clr-namespace:AppManager"
	xmlns:amc="clr-namespace:AppManager.Controls"
	xmlns:t="clr-namespace:System;assembly=mscorlib"
	x:Class="AppManager.MainWindow"
	x:Name="Window"
	Width="490"
	Height="640"
	MinWidth="260"
	MinHeight="150"
	WindowStyle="None"
	AllowsTransparency="False"
	Background="{StaticResource MainWindowBorder}"
	WindowStartupLocation="CenterScreen"
	mc:Ignorable="d"
	Title="{x:Static am:Strings.APP_TITLE}"
	ShowInTaskbar="False"
	ResizeMode="NoResize"
	SnapsToDevicePixels="True"
	Loaded="Window_Loaded"
	PreviewTextInput="Window_PreviewTextInput"
	Activated="Window_Activated"
	Closing="Window_Closing"
	Deactivated="Window_Deactivated">
	<Window.Resources>
		<ResourceDictionary>

			<BorderGapMaskConverter x:Key="BorderGapMaskConverter" />

			<Style
				x:Key="BlueButton"
				TargetType="Button">
				<Setter Property="Background">
					<Setter.Value>
						<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
							<GradientStop Color="#FFBBD5E5" Offset="0"/>
							<GradientStop Color="#FF8DC3E5" Offset="0.9"/>
						</LinearGradientBrush>
					</Setter.Value>	
				</Setter>
			</Style>
			<Style
				x:Key="MainWndCloseButton"
				TargetType="Button">
				<Setter Property="Template">
					<Setter.Value>
						<ControlTemplate TargetType="{x:Type Button}">
							<ControlTemplate.Resources>
								<Storyboard x:Key="CloseButtonAnimation">
									<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ellipse" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
										<SplineColorKeyFrame KeyTime="00:00:00.5000000" Value="#FFFBB0B0"/>
									</ColorAnimationUsingKeyFrames>
								</Storyboard>
							</ControlTemplate.Resources>
							<Grid x:Name="LayoutRoot">
								<Grid.RowDefinitions>
									<RowDefinition Height="0.199*"/>
									<RowDefinition Height="0.596*"/>
									<RowDefinition Height="0.205*"/>
								</Grid.RowDefinitions>
								<Grid.ColumnDefinitions>
									<ColumnDefinition Width="0.178*"/>
									<ColumnDefinition Width="0.625*"/>
									<ColumnDefinition Width="0.197*"/>
								</Grid.ColumnDefinitions>
								<Ellipse Stroke="#FF000000" x:Name="ellipse" Grid.ColumnSpan="3" Grid.RowSpan="3">
									<Ellipse.Fill>
										<RadialGradientBrush SpreadMethod="Pad">
											<GradientStop Color="#FFE12A2A" Offset="0"/>
											<GradientStop Color="#FFF91919" Offset="1"/>
											<GradientStop Color="#FFD62020" Offset="0.582"/>
										</RadialGradientBrush>
									</Ellipse.Fill>
								</Ellipse>
								<Path Fill="{x:Null}" Stretch="Fill" StrokeThickness="3" Data="M4,4 L46,46 M46,4 L4,46" Grid.Column="1" Grid.Row="1">
									<Path.Stroke>
										<LinearGradientBrush EndPoint="0.7,0.91" StartPoint="0.92,0.69">
											<GradientStop Color="#FFE8E8E8" Offset="0"/>
											<GradientStop Color="#FFD6CDCD" Offset="0.982"/>
											<GradientStop Color="#FFFBF2F2" Offset="0.56"/>
										</LinearGradientBrush>
									</Path.Stroke>
								</Path>
							</Grid>
							<ControlTemplate.Triggers>
								<EventTrigger RoutedEvent="Mouse.MouseEnter">
									<BeginStoryboard Storyboard="{StaticResource CloseButtonAnimation}" x:Name="CloseButtonAnimation_BeginStoryboard"/>
								</EventTrigger>
								<EventTrigger RoutedEvent="Mouse.MouseLeave">
									<RemoveStoryboard BeginStoryboardName="CloseButtonAnimation_BeginStoryboard"/>
									<RemoveStoryboard BeginStoryboardName="CloseButtonAnimation_BeginStoryboard"/>
								</EventTrigger>
								<EventTrigger RoutedEvent="Mouse.PreviewMouseDown">
									<RemoveStoryboard BeginStoryboardName="CloseButtonAnimation_BeginStoryboard"/>
									<RemoveStoryboard BeginStoryboardName="CloseButtonAnimation_BeginStoryboard"/>
								</EventTrigger>
							</ControlTemplate.Triggers>
						</ControlTemplate>
					</Setter.Value>
				</Setter>
			</Style>
			<Style
				x:Key="MainWndHelpButton"
				TargetType="Button">
				<Setter Property="Template">
					<Setter.Value>
						<ControlTemplate TargetType="{x:Type Button}">
							<ControlTemplate.Resources>
								<Storyboard x:Key="CloseButtonAnimation">
									<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ellipse" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
										<SplineColorKeyFrame KeyTime="00:00:00.5000000" Value="#FF8CABE4"/>
									</ColorAnimationUsingKeyFrames>
								</Storyboard>
							</ControlTemplate.Resources>
							<Grid x:Name="LayoutRoot">
								<Grid.RowDefinitions>
									<RowDefinition Height="0.199*"/>
									<RowDefinition Height="0.596*"/>
									<RowDefinition Height="0.205*"/>
								</Grid.RowDefinitions>
								<Grid.ColumnDefinitions>
									<ColumnDefinition Width="0.178*"/>
									<ColumnDefinition Width="0.625*"/>
									<ColumnDefinition Width="0.197*"/>
								</Grid.ColumnDefinitions>
								<Ellipse Stroke="#FF000000" x:Name="ellipse" Grid.ColumnSpan="3" Grid.RowSpan="3">
									<Ellipse.Fill>
										<RadialGradientBrush SpreadMethod="Pad">
											<GradientStop Color="#FF3174EA" Offset="0"/>
											<GradientStop Color="#FF194BF9" Offset="1"/>
											<GradientStop Color="#FF2062D6" Offset="0.582"/>
										</RadialGradientBrush>
									</Ellipse.Fill>
								</Ellipse>
								<Image Grid.Column="1" Grid.RowSpan="3" Source="..\Resources\Question.png" Opacity="0.845"/>
							</Grid>
							<ControlTemplate.Triggers>
								<EventTrigger RoutedEvent="Mouse.MouseEnter">
									<BeginStoryboard Storyboard="{StaticResource CloseButtonAnimation}" x:Name="CloseButtonAnimation_BeginStoryboard"/>
								</EventTrigger>
								<EventTrigger RoutedEvent="Mouse.MouseLeave">
									<RemoveStoryboard BeginStoryboardName="CloseButtonAnimation_BeginStoryboard"/>
									<RemoveStoryboard BeginStoryboardName="CloseButtonAnimation_BeginStoryboard"/>
								</EventTrigger>
								<EventTrigger RoutedEvent="Mouse.PreviewMouseDown">
									<RemoveStoryboard BeginStoryboardName="CloseButtonAnimation_BeginStoryboard"/>
									<RemoveStoryboard BeginStoryboardName="CloseButtonAnimation_BeginStoryboard"/>
								</EventTrigger>
							</ControlTemplate.Triggers>
						</ControlTemplate>
					</Setter.Value>
				</Setter>
			</Style>

            <BorderGapMaskConverter x:Key="BgMk"/>
            <Style
				x:Key="CustomGB"
				TargetType="GroupBox">
				<Setter
					Property="Foreground"
					Value="Blue" />
				<Setter
					Property="BorderBrush"
					Value="#FFDFCB9A" />
				<Setter
					Property="BorderThickness"
					Value="1" />
				<!--<Setter
					Property="Template">
					<Setter.Value>
						<ControlTemplate                            
							TargetType="{x:Type GroupBox}">
							<Grid
								SnapsToDevicePixels="True">
								<Grid.ColumnDefinitions>
									<ColumnDefinition
										Width="6" />
									<ColumnDefinition
										Width="Auto" />
									<ColumnDefinition
										Width="*" />
									<ColumnDefinition
										Width="6" />
								</Grid.ColumnDefinitions>
								<Grid.RowDefinitions>
									<RowDefinition
										Height="Auto" />
									<RowDefinition
										Height="Auto" />
									<RowDefinition
										Height="*" />
									<RowDefinition
										Height="6" />
								</Grid.RowDefinitions>
								<Border
									CornerRadius="4"
									SnapsToDevicePixels="True"
									Grid.Row="1"
									Grid.RowSpan="3"
									Grid.Column="0"
									Grid.ColumnSpan="4"
									BorderThickness="{TemplateBinding BorderThickness}"
									BorderBrush="Transparent"
									Background="{TemplateBinding Background}" />
								<Border
									x:Name="Header"
									SnapsToDevicePixels="True"
									Padding="3,0,3,0"
									Grid.Row="0"
									Grid.RowSpan="2"
									Grid.Column="1">
									<ContentPresenter
										ContentSource="Header"
										RecognizesAccessKey="True"
										SnapsToDevicePixels="True"
										TextElement.Foreground="{TemplateBinding Foreground}" />
								   SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
								</Border>
		
								<ContentPresenter
									Grid.Row="2"
									Grid.Column="1"
									Grid.ColumnSpan="2"
									Margin="{TemplateBinding Padding}"
									SnapsToDevicePixels="True"
									/>
								<Border
								   Background="Transparent"
									CornerRadius="4"
									Grid.Row="1"
									Grid.RowSpan="3"
									Grid.ColumnSpan="4"
									SnapsToDevicePixels="True"
									BorderThickness="{TemplateBinding BorderThickness}"
									BorderBrush="{TemplateBinding BorderBrush}">
									<Border.OpacityMask>
										<MultiBinding
											Converter="{StaticResource BorderGapMaskConverter}"
											ConverterParameter="7">
											<Binding
												ElementName="Header"
												Path="ActualWidth" />
											<Binding
												RelativeSource="{RelativeSource Self}"
												Path="ActualWidth" />
											<Binding
												RelativeSource="{RelativeSource Self}"
												Path="ActualHeight" />
										</MultiBinding>
									</Border.OpacityMask>
								</Border>
								SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
							</Grid>
						</ControlTemplate>
					</Setter.Value>
				</Setter>-->               
				<Setter Property="Template">
					<Setter.Value>
						<ControlTemplate TargetType="{x:Type GroupBox}">
							<Grid SnapsToDevicePixels="true">
								<Grid.ColumnDefinitions>
									<ColumnDefinition Width="6"/>
									<ColumnDefinition Width="Auto"/>
									<ColumnDefinition Width="*"/>
									<ColumnDefinition Width="6"/>
								</Grid.ColumnDefinitions>
								<Grid.RowDefinitions>
									<RowDefinition Height="Auto"/>
									<RowDefinition Height="Auto"/>
									<RowDefinition Height="*"/>
									<RowDefinition Height="6"/>
								</Grid.RowDefinitions>
								<Border CornerRadius="4"
								    Grid.Row="1"
								    Grid.RowSpan="3"
								    Grid.Column="0"
								    Grid.ColumnSpan="4"
								    BorderThickness="{TemplateBinding BorderThickness}"
								    BorderBrush="Transparent"
								    Background="{TemplateBinding Background}"/>
								<Border x:Name="Header"
									Padding="3,0,3,0"
									Grid.Row="0"
									Grid.RowSpan="1"
									Grid.Column="1">
									<ContentPresenter 
                                        ContentSource="Header" 
										RecognizesAccessKey="True" 
										SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
										TextElement.Foreground="{TemplateBinding Foreground}" />
								</Border>
								<ContentPresenter 
									Grid.Row="2"
									Grid.Column="1"
									Grid.ColumnSpan="2"
									Margin="{TemplateBinding Padding}"
									SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
								<Border CornerRadius="4"
									Grid.Row="1"
									Grid.RowSpan="3"
									Grid.ColumnSpan="4"
									BorderThickness="{TemplateBinding BorderThickness}"
									>
                                    <Border.Background>
                                        <MultiBinding Converter="{StaticResource BgMk}"
											  ConverterParameter="7">
                                            <Binding ElementName="Header"
											    Path="ActualWidth"/>
                                            <Binding RelativeSource="{RelativeSource Self}"
											    Path="ActualWidth"/>
                                            <Binding ElementName="Header"
											    Path="ActualHeight"/>
                                        </MultiBinding>
                                    </Border.Background>
                                    <!--BorderBrush="{TemplateBinding BorderBrush}"-->
									<!--<Border.OpacityMask>
                                        <MultiBinding Converter="{StaticResource BgMk}"
											  ConverterParameter="7">
											<Binding ElementName="Header"
											    Path="ActualWidth"/>
                                            <Binding RelativeSource="{RelativeSource Self}"
											    Path="ActualWidth"/>
                                            <Binding ElementName="Header"
											    Path="ActualHeight"/>
										</MultiBinding>
									</Border.OpacityMask>-->
								</Border>
                                <!--<Binding RelativeSource="{RelativeSource Self}"
											    Path="ActualHeight"/>-->
                            </Grid>
						</ControlTemplate>
					</Setter.Value>
				</Setter>
			</Style>

			<Storyboard
				x:Key="TrashMarkShow">
				<ObjectAnimationUsingKeyFrames
					BeginTime="00:00:00"
					Storyboard.TargetName="TrashMark"
					Storyboard.TargetProperty="(UIElement.Visibility)"
					Duration="00:00:00.0010000">
					<DiscreteObjectKeyFrame
						KeyTime="00:00:00"
						Value="{x:Static Visibility.Visible}" />
				</ObjectAnimationUsingKeyFrames>
				<DoubleAnimationUsingKeyFrames
					BeginTime="00:00:00"
					Storyboard.TargetName="TrashMark"
					Storyboard.TargetProperty="(UIElement.Opacity)">
					<SplineDoubleKeyFrame
						KeyTime="00:00:01"
						Value="1" />
				</DoubleAnimationUsingKeyFrames>
			</Storyboard>
			<Storyboard
				x:Key="TrashMarkHide">
				<DoubleAnimationUsingKeyFrames
					BeginTime="00:00:00"
					Storyboard.TargetName="TrashMark"
					Storyboard.TargetProperty="(UIElement.Opacity)">
					<SplineDoubleKeyFrame
						KeyTime="00:00:01"
						Value="0" />
				</DoubleAnimationUsingKeyFrames>
				<ObjectAnimationUsingKeyFrames
					BeginTime="00:00:00"
					Storyboard.TargetName="TrashMark"
					Storyboard.TargetProperty="(UIElement.Visibility)"
					Duration="00:00:01">
					<DiscreteObjectKeyFrame
						KeyTime="00:00:01"
						Value="{x:Static Visibility.Collapsed}">
					</DiscreteObjectKeyFrame>
				</ObjectAnimationUsingKeyFrames>
			</Storyboard>

			<LinearGradientBrush
				x:Key="ActiveCaptionBrush"
				EndPoint="0.5,1"
				StartPoint="0.5,0">
				<GradientStop
					Color="#FF158EC1"
					Offset="0" />
				<GradientStop
					Color="#FF00587D"
					Offset="0.996" />
				<GradientStop
					Color="#FF0D6488"
					Offset="0.406" />
			</LinearGradientBrush>
			<LinearGradientBrush
				x:Key="ContenBackBrush"
				EndPoint="0.761,0.963"
				StartPoint="0.239,0.037">
				<GradientStop
					Color="#FF78B3F6"
					Offset="0" />
				<GradientStop
					Color="#FF4F9DF4"
					Offset="1" />
				<GradientStop
					Color="#FF547EAE"
					Offset="0.665" />
			</LinearGradientBrush>
			<LinearGradientBrush
				x:Key="InactiveCaptionBrush"
				EndPoint="0.516,3.766"
				StartPoint="0.513,-2.803">
				<GradientStop
					Color="#FF78B3F6"
					Offset="0.366" />
				<GradientStop
					Color="#FF5E8ABB"
					Offset="0.508" />
				<GradientStop
					Color="#FF6CA6E8"
					Offset="0.668" />
			</LinearGradientBrush>

		</ResourceDictionary>
	</Window.Resources>

	<Border
		ClipToBounds="True"
		Name="MainContentBorder"
		Width="Auto"
		Height="Auto"
		BorderThickness="4,4,4,4"
		CornerRadius="4,4,4,4"
		SnapsToDevicePixels="True" 
		BorderBrush="{StaticResource MainWindowBorder}" 
		Background="{x:Null}">
		<Grid
				Width="Auto"
				Height="Auto"
				Name="GridMain"
				SnapsToDevicePixels="True"
				>
			<Grid.RowDefinitions>
				<RowDefinition
						Height="32" />
				<RowDefinition
						Height="*" />
			</Grid.RowDefinitions>
			<!--Window caption-->
			<Border 
					Name="CaptionBorder" 
					Background="{StaticResource ActiveCaptionBrush}" 
					CornerRadius="5,5,0,0"
					SnapsToDevicePixels="True"
					>
				<Grid
						MouseLeftButtonDown="CaptionGrid_MouseLeftButtonDown"
						SnapsToDevicePixels="True"
						Background="Transparent"
						>
					<Grid.ColumnDefinitions>
						<ColumnDefinition Width="49" />
						<ColumnDefinition Width="49" />
						<ColumnDefinition Width="*" />
						<ColumnDefinition Width="28" />
						<ColumnDefinition Width="28" />
					</Grid.ColumnDefinitions>
					<am:ImageButton
						x:Name="BtnConfigure"
						Width="45"
						Height="24"
						Margin="4,0,0,0"
						Command="{Binding Path=Commands.Settings}"
						ToolTip="{x:Static am:Strings.SETTINGS}"
						ButtonImageSource="/AppManager;component/Resources/gear_2526_16.png"
						Style="{StaticResource BlueButton}"
						Grid.Column="0" 
						/>
					<am:ImageButton
						x:Name="BtnManageApps"
						Width="45"
						Height="24"
						Margin="2,0,0,0"
						HorizontalAlignment="Left"
						Command="{Binding Path=Commands.ManageApps}"
						ToolTip="{x:Static am:Strings.APP_MANAGER}"
						ButtonImageSource="/AppManager;component/Resources/edit_add_1184_16.png"
						Style="{StaticResource BlueButton}"
						Grid.Column="1" />
					<TextBlock
						Name="CaptionTextShadow"
						FontSize="14"
						Foreground="Black"
						TextAlignment="Center"
						TextWrapping="Wrap" 
						Text="{x:Static am:Strings.APP_TITLE}"
						d:IsStaticText="True"
						Grid.Column="2"
						Margin="12,6,6,2" Opacity="0.75"
						IsHitTestVisible="False">
						<Run FontWeight="Bold"/>
					</TextBlock>
					<TextBlock
						Name="CaptionText"
						FontSize="14"
						Foreground="#FFFBD888"
						TextAlignment="Center"
						TextWrapping="Wrap" 
						Text="{x:Static am:Strings.APP_TITLE}"
						d:IsStaticText="True"
						Grid.Column="2"
						Margin="8,4,6,2" Opacity="1"
						IsHitTestVisible="False">
						<Run FontWeight="Bold" Foreground="#FFFFDC8F"/>
					</TextBlock>
					<Button
						Name="ButtonHelp"
						Width="24"
						Height="24"
						Margin="0,0,4,0"
						Content="Button"
						Grid.Column="3"
						Command="{Binding Path=Commands.Help}"
						Style="{StaticResource MainWndHelpButton}">
						<Button.CommandParameter>
							<t:Boolean>True</t:Boolean>
						</Button.CommandParameter>
					</Button>
					<Button
						Name="ButtonExit"
						Width="24"
						Height="24"
						Margin="0,0,4,0"
						Content="Button"
						Grid.Column="4" 
						Command="{Binding Path=Commands.Deactivate}"
						Style="{StaticResource MainWndCloseButton}" />
				</Grid>
			</Border>
			<!--Window content-->
			<Border
					x:Name="ClientAreaBorder"
					Grid.Row="1" 
					CornerRadius="0,0,4,4" 
					Background="{StaticResource ContenBackBrush}"
					SnapsToDevicePixels="True"
					>
				<Canvas		
					Width="Auto"
					Height="Auto"
					SnapsToDevicePixels="True"
					FlowDirection="LeftToRight">
                    <ItemsControl
						Background="Transparent"
						Name="AppTypeContent"
						SnapsToDevicePixels="True"
						ItemsSource="{Binding Path=DataView.AppTypes}"
						AllowDrop="True"
						Focusable="False"
						DragOver="ContentPanel_DragOver"
						>
						<ItemsControl.Width>
							<Binding
								Path="ActualWidth">
								<Binding.RelativeSource>
									<RelativeSource
										Mode="FindAncestor"
										AncestorType="Canvas" />
								</Binding.RelativeSource>
							</Binding>
						</ItemsControl.Width>
						<ItemsControl.Height>
							<Binding
								Path="ActualHeight">
								<Binding.RelativeSource>
									<RelativeSource
										Mode="FindAncestor"
										AncestorType="Canvas" />
								</Binding.RelativeSource>
							</Binding>
						</ItemsControl.Height>
						<ItemsControl.ItemsPanel>
							<ItemsPanelTemplate>
								<amc:VerticalGrid
									SnapsToDevicePixels="True"
									x:Name="ContentGrid"
									IsItemsHost="True"
									Margin="8"
									MinRowHeight="94"
									Focusable="False"
									/>
							</ItemsPanelTemplate>
						</ItemsControl.ItemsPanel>
						<ItemsControl.ItemTemplate>
							<DataTemplate>
                                <Grid
                                    Focusable="False">
									<Grid.RowDefinitions>
										<RowDefinition Height="*"/>
										<RowDefinition Height="6"/>
									</Grid.RowDefinitions>
                                    <amc:BorderedPanel
										x:Name="AppTypeGroup"
										SnapsToDevicePixels="True"
										AllowDrop="True"
										Focusable="False"
                                        FrameBrush="#FFDFCB9A"
                                        Foreground="DarkBlue"
                                        TitleText="{Binding Path=Source.AppTypeName}"
										Initialized="GroupBox_Initialized"
										>
										    <am:ButtonList
                                                x:Name="ButtonAppList"
												BorderBrush="Transparent"
												AllowDrop="True"
												Focusable="False"
                                                Margin="6,0,6,0"
												Loaded="ButtonList_Loaded"
												ItemsSource="{Binding Path=AppInfos}"
												/>
                                    </amc:BorderedPanel>
									<Label
											Grid.Row="1"
                                            Height="6"
											Initialized="Resizer_Initialized"
											/>
                                </Grid>						
							</DataTemplate>
						</ItemsControl.ItemTemplate>
					</ItemsControl>
					<Image
						Visibility="Collapsed"
						HorizontalAlignment="Stretch"
						Height="64"
						Width="64"
						Opacity="0"
						FlowDirection="LeftToRight"
						Name="TrashMark"
						Panel.ZIndex="12"
						AllowDrop="True"
						Source="/AppManager;component/Resources/trash_64.png"
						Stretch="None"
						Drop="TrashMark_Drop"
						DragOver="TrashMark_DragOver"
						>
						<Canvas.Left>
							<Binding
								Path="ActualWidth">
								<Binding.Converter>
									<am:TrashMarkAligner />
								</Binding.Converter>
								<Binding.RelativeSource>
									<RelativeSource
										Mode="FindAncestor"
										AncestorType="Canvas" />
								</Binding.RelativeSource>
							</Binding>
						</Canvas.Left>
						<Canvas.Top>
							<Binding
								Path="ActualHeight">
								<Binding.Converter>
									<am:TrashMarkAligner />
								</Binding.Converter>
								<Binding.RelativeSource>
									<RelativeSource
										Mode="FindAncestor"
										AncestorType="Canvas" />
								</Binding.RelativeSource>
							</Binding>
						</Canvas.Top>
					</Image>
				</Canvas>
			</Border>
			<ResizeGrip
					Grid.Row="1"
					Cursor="SizeNWSE"
					Width="12"
					Height="12"
					HorizontalAlignment="Right"
					VerticalAlignment="Bottom"
					Name="Resizer"
					OverridesDefaultStyle="False"
					MinWidth="12"
					MinHeight="12"
					Opacity="0.75"
					MouseLeftButtonDown="Resizer_MouseLeftButtonDown"
					IsTabStop="False" />
		</Grid>
	</Border>
</Window>